<?php
require_once './../classes/Ville.php';
require_once './../common/database.php';
connect_db();
if (!empty($_GET['ville'])){
$ville=new Ville($_GET['ville']);
$residenceIdList=$ville->getResidencesId();
$residenceNameList=$ville->getResidencesName();

for ($i=0;$i<count($residenceIdList);$i++){
	print("<a href='./residence/index.php?id=$residenceIdList[$i]'>$residenceNameList[$i]<br>");
}
}
else echo "selectionner une residence";
